﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace UI.Forms
{
    public partial class add_kf_tc :FormBase1
    {
        public delegate void DoAction(string areacode);//如果有参数的话，定义参数 

        public DoAction FatherRefresh;

        public add_kf_tc()
        {
            InitializeComponent();
        }

        private void btn_OK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (!dvp.Validate()) return;
            SVC.client.kf_tc tc=new SVC.client.kf_tc();
            tc.title=textEdit1.Text;
            string r = my.bw.kf_tc_Add(tc, my.ACID);
            if (!string.IsNullOrEmpty(r))
            {
                Comm.ShowErorr(r);
            }
            else
            {
                FatherRefresh(tc.title);
                this.Close();
            }
        }

        
    }
}